Loading
Scriptbox
 VBScript Links 
 About VBscript 
 JavaScript Links 
 About JavaScript 
 Powershell Links 
 PSCRIPT the Script Launcher 
 PowerShell Shortcut Keys 
 About Powershell 
     VBScript
    JavaScript
    Powershell
Disclaimer
Contact
Latest 10 Scripts
Script search
  :: { Category } :: 0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ
         

Search Options:  List  all  Properties  and  values  of  Class  

 Content of List all Properties and values of Class.ps1
MD5 Hash: 6772FB534CD96342A3989A7A50108B32
$wmiClass = "win32_operatingsystem"
$strComputer = "."
$wmiNS = "\root\cimv2"
$wmiQuery = "Select * from " + $wmiClass
$strUsr ="" #Blank for current security. Domain\Username
$strPWD = "" #Blank for current security.
$strLocl = "MS_409" #US English. Can leave blank for current language
$strAuth = "" #if specify domain in strUsr this must be blank
$iFlag = "0" #only two values alllowed: 0 and 128.

$objLocator = New-Object -comobject "WbemScripting.SWbemLocator"
$objWMIService = $objLocator.ConnectServer($strComputer, `
$wmiNS, $strUsr, $strPWD, $strLocl, $strAuth, $iFLag)

$colItems = $objWMIService.ExecQuery($wmiQuery)

foreach ($objItem In $colItems)
{"`n"
foreach ($i in $objItem.properties_)
{Write-Host $i.name.tostring(), " `t" , $i.value.tostring()}
}


   © 2008 - 2013 Boris Toll      :: Scripts available: 6.481 ::      :: scriptbox.toll.at ::      :: powered by www.toll.at ::
  Google Entries:n/a
  Yahoo Backlinks:n/a
  Live Backlinks:n/a
  del.icio.us Bookmarks:n/a
  Technorati Links:n/a